const router = require('koa-router')()
const auth = require('../middleware/jwt')
const UserController = require('../controller/user')

const controller = new UserController()

router.prefix('/user')

router.post('/login', controller.login.bind(controller))
router.get('/get', auth,  controller.get.bind(controller))
router.post('/delete', auth,  controller.delete.bind(controller))
router.get('/list', auth,  controller.list.bind(controller))
router.post('/create', controller.create.bind(controller))

module.exports = router
